<template>
	<view>
		<table>
			<tr>
				<td>活动名称</td>
				<td><input type="text" v-model="HuoDoName" style="background-color: antiquewhite;"></td>
			</tr>
			
			<tr>
				<td>活动价格</td>
				<td><input type="text" v-model="price" style="background-color: antiquewhite;"></td>
			</tr>
			<tr>
				<td>报名截止日期</td>
				<td><input type="text" v-model="BaoMingTime" style="background-color: antiquewhite;"></td>
			</tr>
			<tr>
				<td>参加活动时间</td>
				<td><input type="text" v-model="ChanJiaTime" style="background-color: antiquewhite;"></td>
			</tr>
			<tr>
				<td>参加活动地点</td>
				<td><input type="text" v-model="Address" style="background-color: antiquewhite;"></td>
			</tr>
			<tr>
				<td>活动数量</td>
				<td><input type="text" v-model="num" style="background-color: antiquewhite;"></td>
			</tr>
			<tr>
				<td>已报数量</td>
				<td><input type="text" v-model="BaoNum" style="background-color: antiquewhite;"></td>
			</tr>
			<tr>
				<td>活动状态</td>
				<td><input type="text" v-model="status" style="background-color: antiquewhite;"></td>
			</tr>
			<tr>
				<td>创建人</td>
				<td><input type="text" v-model="createName" style="background-color: antiquewhite;"></td>
			</tr>
		</table>

		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				HuoDoName :"",
				price :"",
				BaoMingTime :"",
				ChanJiaTime :"",
				Address :"",
				num :"",
				BaoNum :"",
				status :"",
				createName :"",
			}
		},
		methods: {
			add() {
				uni.uploadFile({
					url: 'http://127.0.0.1:8080/add', //仅为示例，非真实的接口地址
					filePath: this.fileimg,
					name: 'img',
					formData: {
						HuoDoName :this.HuoDoName,
						price :this.price,
						BaoMingTime :this.BaoMingTime,
						ChanJiaTime :this.ChanJiaTime,
						Address :this.Address,
						num :this.num,
						BaoNum :this.BaoNum,
						status :this.status,
						createName :this.createName,
					},
					success: (uploadFileRes) => {
						console.log(uploadFileRes);
					}
				});
			},
			getimg() {
				uni.chooseImage({
					success: (chooseImageRes) => {
						const tempFilePaths = chooseImageRes.tempFilePaths;
						this.fileimg = tempFilePaths[0]
					}
				});
			},
		}
	}
</script>

<style>

</style>
